<?php
$this->breadcrumbs = array(
	'Documents'=>array('index'),
	$model->id,
);

$this->menu = array(
	array('label'=>'List Document', 'url'=>array('index')),
	array('label'=>'Create Document', 'url'=>array('create')),
	array('label'=>'Update Document', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Document', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete', 'id'=>$model->id), 'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Document', 'url'=>array('admin')),
);
?>

<h1>View Document #<?php echo $model->id; ?></h1>

<p>
<?php
foreach ($model->thumbnailUrls as $i=>$url) {
	$alt = 'Page ' . ($i + 1);
	echo CHtml::image($url, $alt);
}
?>
</p>

<?php
$text = 'Download Pdf';
$url = array('document/download', 'id'=>$model->id);
$value = CHtml::link($text, $url
);
$this->widget(
	'zii.widgets.CDetailView',
	array(
	'data'=>$model,
	'attributes'=>array(
		'code',
		'synopsis',
		array(
			'label'=>'File',
			'type'=>'raw',
			'value'=>$value,
		),
	),
	)
);
?>
